home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / nyquist < prev    next >
Internet Message Format  |  1995-03-31  |  2KB

  1. From en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!uakari.primate.wisc.edu!caen!news.cs.indiana.edu!msi.umn.edu!noc.MR.NET!gacvx2.gac.edu!hhdist 22 Feb 91 07:02:09 GMT
  2. Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!uakari.primate.wisc.edu!caen!news.cs.indiana.edu!msi.umn.edu!noc.MR.NET!gacvx2.gac.edu!hhdist
  3. From: wong@enel.ucalgary.ca (Raymond Wong)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: RE:  Nyquist Plot Program
  6. Message-ID: <9102220702.AA13535@enel.enel.ucalgary.ca>
  7. Date: 22 Feb 91 07:02:09 GMT
  8. Lines: 36
  9. Return-path: <wong@enel.ucalgary.ca>
  10. To: handhelds@gac.edu
  11.  
  12. I have created two small programs for doing Nyquist plots, NYQL (does a line
  13. plot) and NYQUIST (does a point plot).  Also in the directory is G, which
  14. is the open-loop transfer function in terms of 'S'.  To do different equations
  15. and values of gain just edit 'G'.  To plot in different ranges of
  16. frequency (W) and step rates, simply change the values in the FOR STEP loop.
  17. Change plot x/y parameters to approprate Real/Imaginary range of plot.
  18.  
  19. Hope this will help... although I'm sure it could be improved, at least it
  20. gets the job done.
  21.  
  22. %%HP: T(3)A(D)F(.);
  23. DIR
  24.   G
  25.     \<< \-> S '10/(S*(S        @ edit this transfer function, leave \-> S
  26. +1)*(S+2))'            @ in tact
  27.     \>>
  28.   PPAR { (-5,-10)        @ Real/Imaginary range of plot
  29. (.1,20) W 0 (0,0)
  30. FUNCTION C }
  31.   NYQUIST            @ Nyquist point plot
  32.     \<< ERASE .001        @ Adjust .001 100 to appropriate start,
  33. 100                @ stop frequency range
  34.       FOR W i W * G
  35. \->NUM PIXON PICT RCL
  36. \->LCD .1            @ Adjust .1 to appropriate freq. step rate
  37.       STEP
  38.     \>>
  39.   NYQL                @ Nyquist line plot
  40.     \<< ERASE .001 i
  41. * G \->NUM .001 100        @ Adjust .001 100 to appropriate start,
  42.       FOR W i W * G        @ stop frequency range
  43. \->NUM DUP 3 ROLLD
  44. LINE PICT RCL \->LCD
  45. .5                @ Adjust .5 to appropriate freq. step rate
  46.       STEP
  47.     \>>
  48. END
  49.  
  50.